import request from '@/api/request.js';

/**
export const list = `${host}console/product/list`;
export const detail = `${host}console/product/detail`;
export const category = `${host}console/category/list`;
export const edit = `${host}console/product/edit`;
export const create = `${host}console/product/create`;
export const exports = `${host}console/product/export`;
export const del = `${host}console/product/delete`;
export const switchStatus = `${host}console/product/status`;
 */

// 列表
export const querySkuList = (data) => request({
  url: '/console/product/list',
  method: 'post',
  data,
});

// 上下架
export const switchStatus = (data) => request({
  url: '/console/product/status',
  method: 'post',
  data,
});

// 删除product
export const deleteProduct = (data) => request({
  url: `/console/product/delete?productId=${data.productId}`,
  method: 'post',
});
